#@layout()
#define main()
<form action="#(path)/portal/qrcode/qrcodeActivity/update" class="layui-form layui-form-pane f-form" method="post"
      autocomplete="off">
    #include("_form.html")
</form>
#end

#define js()
<script>
    function genQrcode() {
        var activityNum = $("#activityNum").val();
        layer.confirm('确定要生成活动二维码吗？', function (index) {
            $.ajax({
                url: "#(path)/portal/qrcode/qrcodeActivity/getQrCode",
                type: "POST",
                data: {
                    "activityNum": activityNum
                },
                success: function (data) {
                    if (data != null) {
                        $("#qrcodeUrl").val(data.codeAddress);
                        $("#ticket").val(data.ticket);
                        $("#activityNum").val(data.activityNum);
                        $("#qrcodeUrlImg").attr("src", data.codeAddress);
                        $("#qrcodeUrlImg").show();
                        layer.msg('生成成功！');
                    }
                }
            });
            layer.close(index);
        });
    };

</script>

#end